package handle

import (
	"net/http"

	"github.com/go-chi/chi/v5"
)

type Resp struct {
}

func (p Resp) InitRoute(party chi.Router) {
	party.Route("/resp", func(r chi.Router) {
		r.Get("/string", p.String())
	})
}
func (p Resp) String() http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		w.Header().Set("Content-Type", "application/json; charset=utf-8")
		w.WriteHeader(http.StatusOK)
		w.Write([]byte(`{"status":"ok"}`))
	}
}
